.TH std::iter_value_t,std::iter_reference_t,std::iter_const_reference_t, 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::iter_value_t,std::iter_reference_t,std::iter_const_reference_t, \- std::iter_value_t,std::iter_reference_t,std::iter_const_reference_t,

.SH Synopsis

   Defined in header <iterator>
   template< class T >                                                   (exposition
   concept /*dereferenceable*/ = /* see below */;                        only*)
   template< class T >                                               \fB(1)\fP \fI(since C++20)\fP
   using iter_value_t = /* see below */;
   template< /*dereferenceable*/ T >                                 \fB(2)\fP \fI(since C++20)\fP
   using iter_reference_t = decltype(*std::declval<T&>());
   template< std::indirectly_readable T >

   using iter_const_reference_t = std::common_reference_t<const
   std::iter_value_t<T>&&,                                           \fB(3)\fP (since C++23)


    std::iter_reference_t<T>>;
   template< class T >                                               \fB(4)\fP \fI(since C++20)\fP
   using iter_difference_t = /* see below */;
   template< /*dereferenceable*/ T>

       requires /* see below */                                      \fB(5)\fP \fI(since C++20)\fP

   using iter_rvalue_reference_t =
   decltype(ranges::iter_move(std::declval<T&>()));
   template< std::indirectly_readable T >

   using iter_common_reference_t =
   std::common_reference_t<std::iter_reference_t<T>,                 \fB(6)\fP \fI(since C++20)\fP


   std::iter_value_t<T>&>;

   Compute the associated types of an iterator. The exposition-only concept
   dereferenceable is satisfied if and only if the expression *std::declval<T&>() is
   valid and has a referenceable type (in particular, not void).

   1) Computes the value type of T.
     * If std::iterator_traits<std::remove_cvref_t<T>> is not specialized, then
       std::iter_value_t<T> is
       std::indirectly_readable_traits<std::remove_cvref_t<T>>::value_type.
     * Otherwise, it is std::iterator_traits<std::remove_cvref_t<T>>::value_type.
   2) Computes the reference type of T.
   3) Computes the const reference type of T.
   4) Computes the difference type of T.
     * If std::iterator_traits<std::remove_cvref_t<T>> is not specialized, then
       std::iter_difference_t<T> is
       std::incrementable_traits<std::remove_cvref_t<T>>::difference_type.
     * Otherwise, it is std::iterator_traits<std::remove_cvref_t<T>>::difference_type.
   5) Computes the rvalue reference type of T. The "see below" portion of the
   constraint on this alias template is satisfied if and only if the expression
   ranges::iter_move(std::declval<T&>()) is valid and has a referenceable type (in
   particular, not void).
   6) Computes the common reference type of T. This is the common reference type
   between its reference type and an lvalue reference to its value type.

.SH See also

   indirectly_readable        specifies that a type is indirectly readable by applying
   (C++20)                    operator *
                              (concept)
   weakly_incrementable       specifies that a semiregular type can be incremented with
   (C++20)                    pre- and post-increment operators
                              (concept)
   indirectly_readable_traits computes the value type of an indirectly_readable type
   (C++20)                    \fI(class template)\fP
   incrementable_traits       computes the difference type of a weakly_incrementable
   (C++20)                    type
                              \fI(class template)\fP
                              provides uniform interface to the properties of an
   iterator_traits            iterator
                              \fI(class template)\fP
